package br.com.buscapecas.service.impl;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import br.com.buscapecas.model.bean.PecaBean;
import br.com.buscapecas.model.cursor.PecaCursor;
import br.com.buscapecas.model.cursor.QueryResult;


/**
 * @author Maikon Rafael da Rocha
 *
 */
public class BuscaService extends AbstractService {

    public BuscaService(Connection conn) {
        super(conn);
    }

    /**
     * Atributo <code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 4996291662167466755L;

    /**
     * 
     * @param referencia
     * @param descricao
     * @param marca
     * 
     * @author Maikon Rafael da Rocha
     * @throws ClassNotFoundException 
     * @throws InstantiationException 
     * @throws IllegalAccessException 
     * @throws SQLException 
     * @throws SecurityException 
     * @throws IllegalArgumentException 
     * @since 23/05/2012 13:08:36
     */
    public ArrayList<PecaBean> buscaPecasSimples(String pesquisas) throws IllegalArgumentException, SecurityException, SQLException, IllegalAccessException, InstantiationException, ClassNotFoundException {
        PecaCursor pecaCursor = new PecaCursor();
        pecaCursor.setConn(conn);
        ArrayList<String> listaPalavrasBusca = this.formatarPalavrasBusca(pesquisas);
        
        QueryResult<ArrayList<PecaBean>> pecas = pecaCursor.buscaPeca(listaPalavrasBusca, null, null, null);
        return null;
    }
    
}
